home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xcmd / macintal.sit / MacinTalk Stack / card_5903.txt < prev    next >
Encoding:
Text File  |  1989-05-27  |  9.7 KB  |  413 lines

  1. -- card: 5903 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2707
  5. -- name: MacinTalk Demonstration
  6. ----- HyperTalk script -----
  7. on openCard
  8.   hide message box
  9. end openCard
  10.  
  11.  
  12.  
  13. -- part 4 (button)
  14. -- low flags: 00
  15. -- high flags: A003
  16. -- rect: left=4 top=76 right=98 bottom=143
  17. -- title width / last selected line: 0
  18. -- icon id / first selected line: 0 / 0
  19. -- text alignment: 1
  20. -- font id: 0
  21. -- text size: 12
  22. -- style flags: 0
  23. -- line height: 16
  24. -- part name: Generate phonemes
  25. ----- HyperTalk script -----
  26. on mouseUp
  27.   Speak convert, card field rawtext
  28.   put the result into card field phonemetext
  29.   put "" into card field errortext
  30. end mouseUp
  31.  
  32.  
  33.  
  34. -- part 5 (button)
  35. -- low flags: 00
  36. -- high flags: A003
  37. -- rect: left=4 top=49 right=71 bottom=104
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 1
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 0
  44. -- line height: 16
  45. -- part name: Quick Speak
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   Speak words,card field rawtext
  49. end mouseUp
  50.  
  51.  
  52.  
  53. -- part 6 (button)
  54. -- low flags: 00
  55. -- high flags: A003
  56. -- rect: left=4 top=209 right=231 bottom=126
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 1
  60. -- font id: 0
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: Speak phonemes
  65. ----- HyperTalk script -----
  66. on mouseUp
  67.   Speak phonemes, card field phonemetext
  68.   if the result <> "Ok" then
  69.     put the result into card field errortext
  70.   else
  71.     put "" into card field errortext
  72.   end if
  73. end mouseUp
  74.  
  75.  
  76.  
  77. -- part 7 (field)
  78. -- low flags: 01
  79. -- high flags: 0007
  80. -- rect: left=4 top=106 right=204 bottom=507
  81. -- title width / last selected line: 0
  82. -- icon id / first selected line: 0 / 0
  83. -- text alignment: 0
  84. -- font id: 3
  85. -- text size: 12
  86. -- style flags: 0
  87. -- line height: 16
  88. -- part name: rawtext
  89.  
  90.  
  91. -- part 8 (field)
  92. -- low flags: 01
  93. -- high flags: 0007
  94. -- rect: left=3 top=237 right=334 bottom=508
  95. -- title width / last selected line: 0
  96. -- icon id / first selected line: 0 / 0
  97. -- text alignment: 0
  98. -- font id: 4
  99. -- text size: 9
  100. -- style flags: 0
  101. -- line height: 12
  102. -- part name: phonemetext
  103. ----- HyperTalk script -----
  104. on openField
  105.   put "" into card field errortext
  106. end openField
  107.  
  108.  
  109. -- part 10 (button)
  110. -- low flags: 00
  111. -- high flags: A003
  112. -- rect: left=293 top=51 right=74 bottom=404
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 0 / 0
  115. -- text alignment: 1
  116. -- font id: 0
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: Robotic Speech
  121. ----- HyperTalk script -----
  122. on mouseUp
  123.   if word 1 of the short name of me = "Robotic"
  124.   then
  125.   Speak voice,robotic
  126.   Speak "Voice now set to robotic tone"
  127.   set the name of me to "Natural Speech"
  128. else
  129.   Speak voice,natural
  130.   Speak "Voice now set to natural tone"
  131.   set the name of me to "Robotic Speech"
  132. end if
  133. end mouseUp
  134.  
  135.  
  136.  
  137. -- part 11 (button)
  138. -- low flags: 00
  139. -- high flags: A003
  140. -- rect: left=293 top=77 right=99 bottom=404
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 0 / 0
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: Volume Level
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   put VolumeLevel() into cvol
  152.   ask "Volume level (1 -> 7)?" with cvol
  153.   if it = cvol or it = "" then
  154.     speak "No change"
  155.   else if (it > 0) and (it < 8) then
  156.     put VolumeLevel(it) into ig
  157.     speak "Vol youmm level now" && it
  158.   else
  159.     speak "Out of range, vol youmm level left at" && cvol
  160.   end if
  161. end mouseUp
  162.  
  163.  
  164.  
  165. -- part 13 (button)
  166. -- low flags: 00
  167. -- high flags: A003
  168. -- rect: left=407 top=77 right=99 bottom=507
  169. -- title width / last selected line: 0
  170. -- icon id / first selected line: 0 / 0
  171. -- text alignment: 1
  172. -- font id: 0
  173. -- text size: 12
  174. -- style flags: 0
  175. -- line height: 16
  176. -- part name: Pitch
  177. ----- HyperTalk script -----
  178. on mouseUp
  179.   ask "Pitch?" with 110
  180.   Speak pitch,it
  181.   Speak "Pitch set to" && it && "hertz"
  182. end mouseUp
  183.  
  184.  
  185.  
  186. -- part 14 (button)
  187. -- low flags: 00
  188. -- high flags: A003
  189. -- rect: left=407 top=51 right=74 bottom=507
  190. -- title width / last selected line: 0
  191. -- icon id / first selected line: 0 / 0
  192. -- text alignment: 1
  193. -- font id: 0
  194. -- text size: 12
  195. -- style flags: 0
  196. -- line height: 16
  197. -- part name: WPM
  198. ----- HyperTalk script -----
  199. on mouseUp
  200.   ask "WPM?" with 150
  201.   Speak rate,it
  202.   Speak "Words per minute set to " & the result
  203. end mouseUp
  204.  
  205.  
  206.  
  207. -- part 16 (field)
  208. -- low flags: 01
  209. -- high flags: 0000
  210. -- rect: left=132 top=212 right=232 bottom=508
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 0 / 0
  213. -- text alignment: 0
  214. -- font id: 3
  215. -- text size: 12
  216. -- style flags: 256
  217. -- line height: 16
  218. -- part name: errortext
  219.  
  220.  
  221. -- part 18 (field)
  222. -- low flags: 01
  223. -- high flags: 0000
  224. -- rect: left=294 top=26 right=48 bottom=506
  225. -- title width / last selected line: 0
  226. -- icon id / first selected line: 0 / 0
  227. -- text alignment: 1
  228. -- font id: 3
  229. -- text size: 14
  230. -- style flags: 256
  231. -- line height: 18
  232. -- part name: 
  233.  
  234.  
  235. -- part 19 (button)
  236. -- low flags: 00
  237. -- high flags: A003
  238. -- rect: left=211 top=49 right=100 bottom=281
  239. -- title width / last selected line: 0
  240. -- icon id / first selected line: 14767 / 14767
  241. -- text alignment: 1
  242. -- font id: 0
  243. -- text size: 12
  244. -- style flags: 0
  245. -- line height: 16
  246. -- part name: Card Tutorial
  247. ----- HyperTalk script -----
  248. on mouseUp
  249.   -- clean up and initialise
  250.   put "" into card field rawtext
  251.   put "" into card field phonemetext
  252.   put "" into card field errortext
  253.   put item 1 of rect of card field rawtext into rawX
  254.   put item 2 of rect of card field rawtext into rawY
  255.   --
  256.   Speak "This card allows you to experiment with MacinTalk."
  257.   Speak "To start, you first type some text into the top field."
  258.   click at rawX+1,rawY+1
  259.   type "This is a MacinTalk interface to HyperCard."
  260.   Speak "Then press the button Generate phonemes"
  261.   click at the loc of card button "Generate phonemes"
  262.   wait 20
  263.   Speak "You will now see that the phonemes for the text have been generated and placed into the lower field"
  264.   Speak "You may now have the phonemes spoken by pressing Speak phonemes"
  265.   click at the loc of card button "Speak phonemes"
  266.   wait 20
  267.   Speak "As you herd, MacinTalk cannot say HyperCard very well!"
  268.   Speak "To correct this you can edit the phonemes."
  269.   Speak "In this case you should change the phoneme I.H. to A.Y."
  270.   select char 3 to 4 of word 7 of card field phonemetext
  271.   wait 20
  272.   put "AY" into the selection
  273.   Speak "Now try Speak phonemes again."
  274.   click at the loc of card button "Speak phonemes"
  275.   wait 20
  276.   Speak "Thats sounds much better, doesn't it!"
  277.   wait 20
  278.   Speak "Now a quick tour of the other buttons."
  279.   set hilite of card button "Quick speak" to true
  280.   Speak "This button will cause the text in the upper field" && "to be spoken without generating the intermediate phonemes."
  281.   set hilite of card button "Quick speak" to false
  282.   set hilite of card button ID 10 to true
  283.   Speak "Switch MacinTalk between natural and robotic voices."
  284.   set hilite of card button ID 10 to false
  285.   set hilite of card button "Volume Level" to true
  286.   Speak "Set the volume level."
  287.   set hilite of card button "Volume Level" to false
  288.   set hilite of card button "WPM" to true
  289.   Speak "Change the number of words per minute that MacinTalk will speak at."
  290.   Speak "The standard rate is one hundred and fifty."
  291.   set hilite of card button "WPM" to false
  292.   set hilite of card button "Pitch" to true
  293.   Speak "Change the pitch of speech."
  294.   Speak "The standard pitch is one hundred and ten hertz."
  295.   set hilite of card button "Pitch" to false
  296.   set hilite of card button "Phoneme TableΓǪ" to true
  297.   Speak "This button displays a table of phonemes"
  298.   set hilite of card button "Phoneme TableΓǪ" to false
  299.   Speak "This is the end of the tutorial. Happy phoneming!"
  300. end mouseUp
  301.  
  302.  
  303.  
  304. -- part 20 (button)
  305. -- low flags: 00
  306. -- high flags: 0000
  307. -- rect: left=475 top=11 right=43 bottom=510
  308. -- title width / last selected line: 0
  309. -- icon id / first selected line: 29484 / 29484
  310. -- text alignment: 1
  311. -- font id: 0
  312. -- text size: 12
  313. -- style flags: 0
  314. -- line height: 16
  315. -- part name: 
  316. ----- HyperTalk script -----
  317. on mouseUp
  318.   visual effect wipe left
  319.   go to next card
  320. end mouseUp
  321.  
  322.  
  323.  
  324. -- part 21 (button)
  325. -- low flags: 00
  326. -- high flags: 0000
  327. -- rect: left=2 top=11 right=43 bottom=35
  328. -- title width / last selected line: 0
  329. -- icon id / first selected line: 3835 / 3835
  330. -- text alignment: 1
  331. -- font id: 0
  332. -- text size: 12
  333. -- style flags: 0
  334. -- line height: 16
  335. -- part name: 
  336. ----- HyperTalk script -----
  337. on mouseUp
  338.   visual effect wipe right
  339.   go to card "Introduction"
  340. end mouseUp
  341.  
  342.  
  343.  
  344. -- part 22 (field)
  345. -- low flags: 01
  346. -- high flags: 0000
  347. -- rect: left=52 top=3 right=24 bottom=460
  348. -- title width / last selected line: 0
  349. -- icon id / first selected line: 0 / 0
  350. -- text alignment: 1
  351. -- font id: 3
  352. -- text size: 18
  353. -- style flags: 768
  354. -- line height: 24
  355. -- part name: 
  356.  
  357.  
  358. -- part 23 (button)
  359. -- low flags: 00
  360. -- high flags: 0000
  361. -- rect: left=37 top=11 right=43 bottom=73
  362. -- title width / last selected line: 0
  363. -- icon id / first selected line: 1011 / 1011
  364. -- text alignment: 1
  365. -- font id: 0
  366. -- text size: 12
  367. -- style flags: 0
  368. -- line height: 16
  369. -- part name: 
  370. ----- HyperTalk script -----
  371. on mouseUp
  372.   go home
  373. end mouseUp
  374.  
  375.  
  376.  
  377. -- part 24 (button)
  378. -- low flags: 00
  379. -- high flags: 8003
  380. -- rect: left=389 top=209 right=231 bottom=509
  381. -- title width / last selected line: 0
  382. -- icon id / first selected line: 0 / 0
  383. -- text alignment: 1
  384. -- font id: 0
  385. -- text size: 12
  386. -- style flags: 0
  387. -- line height: 16
  388. -- part name: Phoneme Table╔
  389. ----- HyperTalk script -----
  390. on mouseUp
  391.   push card
  392.   visual effect iris open
  393.   go to card "phoneme table"
  394. end mouseUp
  395.  
  396.  
  397.  
  398.  
  399. -- part contents for card part 18
  400. ----- text -----
  401. Change SettingsΓǪ
  402.  
  403. -- part contents for card part 22
  404. ----- text -----
  405. MacinTalk Demonstrator
  406.  
  407. -- part contents for card part 7
  408. ----- text -----
  409. Type your English text here.
  410.  
  411. -- part contents for card part 8
  412. ----- text -----
  413. TAYP YOHR FAH1NIY4M TEH1KST /HIYR. #